package com.lzy.crm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.lzy.crm.base.mybatis.BaseMapper;
import com.lzy.crm.base.mybatis.Example;
import com.lzy.crm.base.service.BaseServiceImpl;
import com.lzy.crm.dao.MallMapper;
import com.lzy.crm.dao.criteria.MallCriteria;
import com.lzy.crm.domain.Mall;
import com.lzy.crm.service.MallService;

@Service("mallService")
public class MallServiceImpl extends BaseServiceImpl<Mall, MallCriteria> implements MallService {

	@Resource
	private MallMapper mallMapper;
	
	@Override
	public BaseMapper<Mall, MallCriteria> getBaseMapper() {
		return mallMapper;
	}

	@Override
	public List<Mall> getMallList() {
		Example<MallCriteria> example = new Example<MallCriteria>(MallCriteria.class);
		MallCriteria mallCriteria = example.createCriteria();
		mallCriteria.andStateEqualTo("1");
		//example.setOrderByClause(new String[][]{{"mall_order", "ASC"}});
		return mallMapper.getListByExample(example);
	}

	@Override
	public Mall getMallById(String mallId) {
		return mallMapper.getById(mallId);
	}
	
	
	

}
